<?php

namespace App\Models\Crm;

use Illuminate\Database\Eloquent\Model;

class Application extends Model
{
    /**
     * 按排序字段倒序排序
     */
    public function scopeSorted($query){
        return $query->orderBy('sort_order','desc');
    }

    /**
     * 按时间倒序
     */
    public function scopeCreated_at($query){
        return $query->orderBy('created_at','desc');
    }

    /**
     * 按id倒序
     */
    public function scopeId($query){
        return $query->orderBy('id','desc');
    }

}
